package com.example.users.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
@TableName("uc_role")
public class Role {
    @TableId(type = IdType.AUTO)
    @NotNull(groups = com.example.users.validation.groups.Update.class, message = "id 不能为空")
    private Long id;

    @NotBlank(groups = {com.example.users.validation.groups.Create.class}, message = "角色编码不能为空")
    @Size(max = 64, message = "角色编码长度不能超过64")
    private String code;

    @NotBlank(groups = {com.example.users.validation.groups.Create.class}, message = "角色名称不能为空")
    @Size(max = 64, message = "角色名称长度不能超过64")
    private String name;

    private String description;
}


